# include <bits/stdc++.h>
using namespace std;

int use[2000] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};

inline int gm(int a) { // get matches
    return use[a];
}

int main() {
    freopen("matches.in", "r", stdin);
    freopen("matches.out", "w", stdout);
    for(int i = 10; i <= 1999; i++) {
        use[i] = use[i / 10] + use[i % 10];
    }
    int n, ans = 0;
    cin >> n;
    n -= 4;
    for (int i = 0; i <= 888; i++) {
        for (int j = 0; j <= 888; j++) {
            if(gm(i) + gm(j) + gm(i + j) == n) {
                ans++;
            }
        }
    }
    printf("%d\n", ans);
    return 0;
}